package cn.home.sysmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.sysmanagement.mapper.HomeNoticetypeMapper;
import cn.home.sysmanagement.domain.HomeNoticetype;
import cn.home.sysmanagement.service.IHomeNoticetypeService;

/**
 * 协议类型Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Service
public class HomeNoticetypeServiceImpl implements IHomeNoticetypeService 
{
    @Autowired
    private HomeNoticetypeMapper homeNoticetypeMapper;

    /**
     * 查询协议类型
     * 
     * @param id 协议类型主键
     * @return 协议类型
     */
    @Override
    public HomeNoticetype selectHomeNoticetypeById(Long id)
    {
        return homeNoticetypeMapper.selectHomeNoticetypeById(id);
    }

    /**
     * 查询协议类型列表
     * 
     * @param homeNoticetype 协议类型
     * @return 协议类型
     */
    @Override
    public List<HomeNoticetype> selectHomeNoticetypeList(HomeNoticetype homeNoticetype)
    {
        return homeNoticetypeMapper.selectHomeNoticetypeList(homeNoticetype);
    }

    /**
     * 新增协议类型
     * 
     * @param homeNoticetype 协议类型
     * @return 结果
     */
    @Override
    public int insertHomeNoticetype(HomeNoticetype homeNoticetype)
    {
        return homeNoticetypeMapper.insertHomeNoticetype(homeNoticetype);
    }

    /**
     * 修改协议类型
     * 
     * @param homeNoticetype 协议类型
     * @return 结果
     */
    @Override
    public int updateHomeNoticetype(HomeNoticetype homeNoticetype)
    {
        return homeNoticetypeMapper.updateHomeNoticetype(homeNoticetype);
    }

    /**
     * 批量删除协议类型
     * 
     * @param ids 需要删除的协议类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeNoticetypeByIds(Long[] ids)
    {
        return homeNoticetypeMapper.deleteHomeNoticetypeByIds(ids);
    }

    /**
     * 删除协议类型信息
     * 
     * @param id 协议类型主键
     * @return 结果
     */
    @Override
    public int deleteHomeNoticetypeById(Long id)
    {
        return homeNoticetypeMapper.deleteHomeNoticetypeById(id);
    }
}
